//
//  MyTabBarController.m
//  Tabbar
//
//  Created by 吴志勇 on 2020/4/9.
//  Copyright © 2020 wzy. All rights reserved.
//

#import "MyTabBarController.h"
#import "YellowViewController.h"
#import "RedViewController.h"

@interface MyTabBarController ()

@end

@implementation MyTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self creatUI];
}

//
- (void)creatUI{
    YellowViewController *yVc = [[YellowViewController alloc] init];
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:yVc];
    nav.tabBarItem.title = @"黄页面";
    [self addChildViewController:nav];
    
    RedViewController *rVc = [[RedViewController alloc] init];
    UINavigationController *navR = [[UINavigationController alloc] initWithRootViewController:rVc];
    navR.tabBarItem.title = @"红页面";
    [self addChildViewController:navR];
}

@end
